package com.suoluo.zenapp.vo;

import java.util.ArrayList;
import java.util.List;

import com.suoluo.zenapp.pojo.dest.DestImgResourcePOJO;

public class DestImgNodeVO implements Comparable<DestImgNodeVO>{

	private List<DestImgNodeVO> leafChildren = new ArrayList<DestImgNodeVO>();
	
	private List<DestImgNodeVO> children = new ArrayList<DestImgNodeVO>();
	
	private DestImgResourcePOJO node;
	
	public DestImgNodeVO(DestImgResourcePOJO node){
		this.node = node;
	}

	public List<DestImgNodeVO> getLeafChildren() {
		return leafChildren;
	}

	public void setLeafChildren(List<DestImgNodeVO> leafChildren) {
		this.leafChildren = leafChildren;
	}

	public List<DestImgNodeVO> getChildren() {
		return children;
	}

	public void setChildren(List<DestImgNodeVO> children) {
		this.children = children;
	}

	public DestImgResourcePOJO getNode() {
		return node;
	}

	public void setNode(DestImgResourcePOJO node) {
		this.node = node;
	}
	
	public void addLeaf(DestImgNodeVO	leaf){
		this.leafChildren.add(leaf);
	}
	public void addChildNode(DestImgNodeVO child){
		this.children.add(child);
	}

	@Override
	public int compareTo(DestImgNodeVO o) {
		return this.node.getLayerIndex() - o.node.getLayerIndex();
	}
}
